class AlterTourGroupsColumn < ActiveRecord::Migration
  def self.up
    # 添加北京成本
    add_column :tour_groups, :bj_cost, :decimal, :precision => 8, :scale => 2, :default => 0, :null => false
    # 添加总成本
    add_column :tour_groups, :total_cost, :decimal, :precision => 8, :scale => 2, :default => 0, :null => false
  end

  def self.down
    # 去掉新增的字段
    remove_column :tour_groups, :bj_cost
    remove_column :tour_groups, :total_cost
  end
end
